package resolver

// This file will be automatically regenerated based on the schema, any resolver implementations
// will be copied through when generating and any unknown code will be moved to the end.

import (
	"context"
	"fmt"

	"mall/service/wpgql/api/internal/graph/generated"
	"mall/service/wpgql/api/internal/graph/model"
)

func (r *menuItemResolver) ChildItems(
	ctx context.Context,
	obj *model.MenuItem,
	first *int,
	last *int,
	after *string,
	before *string,
	where *model.MenuItemToMenuItemConnectionWhereArgs,
) (*model.MenuItemToMenuItemConnection, error) {
	if where == nil {
		return obj.ChildItems, nil
	}

	return &model.MenuItemToMenuItemConnection{}, nil
}

func (r *queryResolver) MenuItem(ctx context.Context, id string, idType *model.MenuItemNodeIDTypeEnum) (*model.MenuItem, error) {
	panic(fmt.Errorf("not implemented"))
}

func (r *queryResolver) MenuItems(ctx context.Context, first *int, last *int, after *string, before *string, where *model.RootQueryToMenuItemConnectionWhereArgs) (*model.RootQueryToMenuItemConnection, error) {
	panic(fmt.Errorf("not implemented"))
}

// MenuItem returns generated.MenuItemResolver implementation.
func (r *Resolver) MenuItem() generated.MenuItemResolver { return &menuItemResolver{r} }

type menuItemResolver struct{ *Resolver }
